class RepairStatus {
  static const String ORDER_RECEIVED = "0";
  static const String REPAIRING = "1";
  static const String DELIVERED = "2";
  static describe(String status){
    if(status == ORDER_RECEIVED)
      return "已接单";
    if(status == REPAIRING)
      return "维修中";
    if(status == DELIVERED)
      return "已交付";
  }
}

class AppraiseStatus {
  static const String NONE = "0";
  static const String OWNER = "1";
  static const String ENGINEER = "2";
  static const String BOTH = "3";
  static describe(String status){
    if(status == NONE)
      return "代评价";
    if(status == OWNER)
      return "需方已评";
    if(status == ENGINEER)
      return "供方已评";
    if(status == BOTH)
      return "双方已评";
  }
}

class EngineerLevel{
  static const int STAR1 = 1;
  static const int STAR2 = 2;
  static const int STAR3 = 3;
  static const int STAR4 = 4;
  static const int STAR5 = 5;

  static describe(int level)
  {
    var ret = "";
    if (level == 1)
      ret = "一星";
    else if (level == 2)
      ret = "二星";
    else if (level == 3)
      ret = "三星";
    else if (level == 4)
      ret = "四星";
    else if (level == 5)
      ret = "五星";

    return ret;
  }

}
class MROrder {
  final String id;
  final String title;
  final String engineerName;
  final String engineerAvatar;
  final int engineerStar;
  final String status;
  final String appraised;

  MROrder(this.id, this.title, this.engineerName, this.engineerAvatar,
      this.engineerStar, this.status, this.appraised);
}

class LendingOrder {
  final String id;
  final String title;
  final String image;
  final String provider;
  final num amount;
  final String status;

  LendingOrder(this.id, this.title, this.image, this.provider, this.amount, this.status);
}

class GoodsItem {
  final String id;
  final String image;
  final String name;
  final num price;
  final int quantity;

  GoodsItem(this.id, this.image, this.name, this.price, this.quantity);
}

class PartsOrder {
  final String id;
  final String sellerName;
  final String status;
  final bool exchange;
  final List<GoodsItem> goods;

  PartsOrder(this.id, this.sellerName, this.status, this.exchange, this.goods);
}